import request from '@/utils/request'

// 查询工单列表
export function listWorkOrder(query) {
    return request({
        url: `/workOrder/list/${query.pageNum}/${query.pageSize}/${query.totalRow}`,
        method: 'post',
        data: query
    })
}

// 查询工单详细
export function getWorkOrder(id) {
    return request({
        url: '/workOrder/' + id,
        method: 'get'
    })
}

// 新增工单
export function addWorkOrder(data) {
    return request({
        url: '/workOrder/save',
        method: 'post',
        data: data
    })
}

// 修改工单
export function updateWorkOrder(data) {
    return request({
        url: '/workOrder/update',
        method: 'put',
        data: data
    })
}

// 删除工单
export function delWorkOrder(id) {
    return request({
        url: '/workOrder/remove/' + id,
        method: 'delete'
    })
}
